<?php 
/*
* StiPHPcms, A web Content management System made with PHP/MySQL
* JordSti : jord52@gmail.com
* Version : 0.0.1
*
* Copyright (C) 2009  jord52@gmail.com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/

$struct = array(

"CREATE TABLE `%prefix%menu` (
  `id` int(25) NOT NULL AUTO_INCREMENT,
  `lname` varchar(255) NOT NULL,
  `url` varchar(255) NOT NULL,
  `zindex` int(25) NOT NULL,
  `rank_req` int(25) NOT NULL,
  PRIMARY KEY (`id`)
) TYPE=MyISAM ;",

"CREATE TABLE `%prefix%modules` (
  `id` int(25) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `classfile` varchar(255) NOT NULL,
  `admin_module` int(1) NOT NULL,
  `version` int(25) NOT NULL,
  PRIMARY KEY (`id`)
) TYPE=MyISAM ;",


"CREATE TABLE `%prefix%navbar` (
  `id` int(25) NOT NULL AUTO_INCREMENT,
  `lname` varchar(255) NOT NULL,
  `url` varchar(255) NOT NULL,
  `zindex` int(25) NOT NULL,
  `rank_req` int(25) NOT NULL,
  PRIMARY KEY (`id`)
) TYPE=MyISAM ;",

"CREATE TABLE `%prefix%profiles` (
  `id` int(25) NOT NULL AUTO_INCREMENT,
  `user_id` int(25) NOT NULL,
  `avatar` varchar(64) NOT NULL,
  `profile_name` varchar(32) NOT NULL,
  `email` varchar(64) NOT NULL,
  `msn` varchar(64) NOT NULL,
  `forum_signature` tinytext NOT NULL,
  `country` varchar(45) NOT NULL,
  `city` varchar(42) NOT NULL,
  `work` varchar(32) NOT NULL,
  `website` varchar(64) NOT NULL,
  `birthdate` int(255) NOT NULL,
  PRIMARY KEY (`id`)
) TYPE=MyISAM ;",


"CREATE TABLE `%prefix%rank` (
  `id` int(25) NOT NULL,
  `rankname` varchar(32) NOT NULL,
  PRIMARY KEY (`id`)
) TYPE=MyISAM;",



"CREATE TABLE `%prefix%session` (
  `id` int(25) NOT NULL AUTO_INCREMENT,
  `ip` varchar(16) NOT NULL,
  `user_id` int(25) NOT NULL,
  `session_id` varchar(40) NOT NULL,
  `session_data` text NOT NULL,
  `first_timestamp` int(25) NOT NULL,
  `timestamp` int(25) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;
",



"CREATE TABLE `%prefix%settings` (
  `id` int(25) NOT NULL AUTO_INCREMENT,
  `varname` varchar(255) NOT NULL,
  `value` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) TYPE=MyISAM ;",




"CREATE TABLE `%prefix%users` (
  `id` int(25) NOT NULL AUTO_INCREMENT,
  `username` varchar(32) NOT NULL,
  `password` varchar(32) NOT NULL,
  `email` varchar(64) NOT NULL,
  `timestamp` int(25) NOT NULL,
  `rank` int(8) NOT NULL,
  `activation_code` varchar(32) NOT NULL,
  PRIMARY KEY (`id`)
) TYPE=MyISAM ;",



"CREATE TABLE `%prefix%visitlog` (
  `id` int(25) NOT NULL AUTO_INCREMENT,
  `useragent` varchar(255) NOT NULL,
  `scriptname` varchar(255) NOT NULL,
  `uri` varchar(255) NOT NULL,
  `ip` varchar(255) NOT NULL,
  `userid` int(25) NOT NULL,
  `filename` varchar(255) NOT NULL,
  `timestamp` int(25) NOT NULL,
  PRIMARY KEY (`id`)
) TYPE=MyISAM ;",

"CREATE TABLE `%prefix%pages` (
  `id` int(25) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `content` longtext NOT NULL,
  `user_id` int(25) NOT NULL,
  `timestamp` int(255) NOT NULL,
  `time_lastedit` int(255) NOT NULL,
  `rank_to_see` int(25) NOT NULL,
  `rank_to_edit` int(25) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM ;",



);


?>